<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
</head>
<body>
<%

String id=request.getParameter("id");
int ID=Integer.parseInt(id);

try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/STUDENTS", "root", "sannu");
String query="DELETE FROM REGISTRATION WHERE id='"+ID+"'";
PreparedStatement psmt=connection.prepareStatement(query);
psmt.executeUpdate(query);
response.sendRedirect("DataRetrive.jsp");
}
catch(Exception e){}
%>
</body>
</html>